# $Id: PKGBUILD 182627 2013-04-11 16:07:18Z andrea $
# Maintainer: Andrea Scarpino <andrea@archlinux.org>

pkgbase=calligra-l10n
pkgname=('calligra-l10n-bs'
   'calligra-l10n-ca'
   'calligra-l10n-ca@valencia'
   'calligra-l10n-da'
   'calligra-l10n-de'
   'calligra-l10n-el'
   'calligra-l10n-en_gb'
   'calligra-l10n-es'
   'calligra-l10n-et'
   'calligra-l10n-fi'
   'calligra-l10n-fr'
   'calligra-l10n-gl'
   'calligra-l10n-hu'
   'calligra-l10n-it'
   'calligra-l10n-kk'
   'calligra-l10n-nb'
   'calligra-l10n-nds'
   'calligra-l10n-nl'
   'calligra-l10n-pl'
   'calligra-l10n-pt'
   'calligra-l10n-pt_br'
   'calligra-l10n-ru'
   'calligra-l10n-sk'
   'calligra-l10n-sl'
   'calligra-l10n-sv'
   'calligra-l10n-tr'
   'calligra-l10n-uk'
   'calligra-l10n-zh_cn'
   'calligra-l10n-zh_tw')
pkgver=2.6.3
pkgrel=1
pkgdesc="Localization for Calligra"
arch=('any')
url='http://www.calligra-suite.org/'
license=('LGPL')
makedepends=('cmake' 'automoc4' 'kdelibs')
options=('docs')
source=("http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-bs-${pkgver}.tar.bz2"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-ca-${pkgver}.tar.bz2"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-ca@valencia-${pkgver}.tar.bz2"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-da-${pkgver}.tar.bz2"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-de-${pkgver}.tar.bz2"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-el-${pkgver}.tar.bz2"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-en_GB-${pkgver}.tar.bz2"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-es-${pkgver}.tar.bz2"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-et-${pkgver}.tar.bz2"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-fi-${pkgver}.tar.bz2"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-fr-${pkgver}.tar.bz2"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-gl-${pkgver}.tar.bz2"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-hu-${pkgver}.tar.bz2"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-it-${pkgver}.tar.bz2"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-kk-${pkgver}.tar.bz2"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-nb-${pkgver}.tar.bz2"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-nds-${pkgver}.tar.bz2"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-nl-${pkgver}.tar.bz2"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-pl-${pkgver}.tar.bz2"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-pt-${pkgver}.tar.bz2"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-pt_BR-${pkgver}.tar.bz2"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-ru-${pkgver}.tar.bz2"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-sk-${pkgver}.tar.bz2"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-sl-${pkgver}.tar.bz2"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-sv-${pkgver}.tar.bz2"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-tr-${pkgver}.tar.bz2"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-uk-${pkgver}.tar.bz2"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-zh_CN-${pkgver}.tar.bz2"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-zh_TW-${pkgver}.tar.bz2")
md5sums=('c2a0cc379533c756cd1460deac874f4f'
         'ac6933d11db5c527a50bb6b51a249b30'
         '00a8c881a087e6fb634d7752a542da72'
         '21e42139215c8f9a3c6ad4eb17808d46'
         '70bf383f0ba4b938ddd617f2f6652d1e'
         'e104c34a00347ab0d5f5dc0dad709853'
         'a2490066102e8c0acd78aee74069c143'
         '24c69b328dd9f8b4c0527b3f4cc938f0'
         'e744e9699cb37806b5d3cbaaa4ba393f'
         'fabbf2464086e3fceb98355ff438ff5f'
         '0bd7585c203795b15b506d0d823e78e0'
         'a8763794416fe04aed42c4475a8f3fe5'
         '122de5839554f8d08262a04e8900b01b'
         '4d0abccb21f1413607d0a28b86934075'
         '41387a63777b86c50d87f310774436c8'
         '5bddc85aee9beabc7b1348ab313acbbb'
         '12489c8d21332a65b1744a3ae08de218'
         'bf3cc8e28065957212fd106fa395a4c8'
         '3364250fd4fde92c8a9568ae145f8682'
         'f2dc15ec51a6737c702f90d1da9a5375'
         '7bc5c334e10b2353532548dc79854643'
         '6d296dab1e04d4efcf07807899911fc1'
         '3053eaca25a9cbb777bb7bd16fd140c1'
         '402ba5abdaf46798515d849cda13f595'
         '078dd183beae03cc0e5fbdb88a62fb20'
         '39bb522ed0f7046dd84f5321743d8e8d'
         '3defbdcdd67a3c256b51d0f1b1d3711b'
         '051833f7fa20c25bf206b1f23071b6ed'
         '03df7c5a5a266435f3a9bc715a33339d')

build() {
  for lang in bs ca ca@valencia da de el en_GB es et fi fr gl hu it kk nb nds \
    nl pl pt pt_BR ru sk sl sv tr uk zh_CN zh_TW; do
    mkdir -p build/$lang
    cd build/$lang
    cmake ${srcdir}/${pkgbase}-$lang-${pkgver} \
      -DCMAKE_BUILD_TYPE=Release \
      -DCMAKE_INSTALL_PREFIX=/usr
    make
    cd ../..
  done
}

package_calligra-l10n-bs() {
  pkgdesc=('Bosnian Localization for Calligra')
  replaces=('koffice-l10n-bs')
  cd "${srcdir}"/build/bs
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-ca() {
  pkgdesc=('Catalan Localization for Calligra')
  replaces=('koffice-l10n-ca')
  cd "${srcdir}"/build/ca
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-ca@valencia() {
  pkgdesc=('Catalan (Valencia) Localization for Calligra')
  replaces=('koffice-l10n-ca@valencia')
  cd "${srcdir}"/build/ca@valencia
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-da() {
  pkgdesc=('Danish Localization for Calligra')
  replaces=('koffice-l10n-da')
  cd "${srcdir}"/build/da
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-de() {
  pkgdesc=('German Localization for Calligra')
  replaces=('koffice-l10n-de')
  cd "${srcdir}"/build/de
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-el() {
  pkgdesc=('Greek Localization for Calligra')
  replaces=('koffice-l10n-el')
  cd "${srcdir}"/build/el
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-en_gb () {
  pkgdesc=('British Localization for Calligra')
  replaces=('koffice-l10n-en_gb')
  cd "${srcdir}"/build/en_GB
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-es() {
  pkgdesc=('Spanish Localization for Calligra')
  replaces=('koffice-l10n-es')
  cd "${srcdir}"/build/es
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-et() {
  pkgdesc=('Estonian Localization for Calligra')
  replaces=('koffice-l10n-et')
  cd "${srcdir}"/build/et
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-fi() {
  pkgdesc=('Finnish Localization for Calligra')
  replaces=('koffice-l10n-fi')
  cd "${srcdir}"/build/fi
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-fr() {
  pkgdesc=('French Localization for Calligra')
  replaces=('koffice-l10n-fr')
  cd "${srcdir}"/build/fr
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-gl() {
  pkgdesc=('Galician Localization for Calligra')
  replaces=('koffice-l10n-gl')
  cd "${srcdir}"/build/gl
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-hu() {
  pkgdesc=('Hungarian Localization for Calligra')
  replaces=('koffice-l10n-hu')
  cd "${srcdir}"/build/hu
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-it() {
  pkgdesc=('Italian Localization for Calligra')
  replaces=('koffice-l10n-it')
  cd "${srcdir}"/build/it
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-kk() {
  pkgdesc=('Kazakh Localization for Calligra')
  replaces=('koffice-l10n-kk')
  cd "${srcdir}"/build/kk
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-nb() {
  pkgdesc=('Norwegian Bookmal Localization for Calligra')
  replaces=('koffice-l10n-nb')
  cd "${srcdir}"/build/nb
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-nds() {
  pkgdesc=('Low Saxon Localization for Calligra')
  replaces=('koffice-l10n-nds')
  cd "${srcdir}"/build/nds
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-nl() {
  pkgdesc=('Dutch Localization for Calligra')
  replaces=('koffice-l10n-nl')
  cd "${srcdir}"/build/nl
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-pl() {
  pkgdesc=('Polish Localization for Calligra')
  replaces=('koffice-l10n-pl')
  cd "${srcdir}"/build/pl
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-pt() {
  pkgdesc=('Portugese Localization for Calligra')
  replaces=('koffice-l10n-pt')
  cd "${srcdir}"/build/pt
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-pt_br() {
  pkgdesc=('Brazilian Portugese Localization for Calligra')
  replaces=('koffice-l10n-pt_br')
  cd "${srcdir}"/build/pt_BR
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-ru() {
  pkgdesc=('Russian Localization for Calligra')
  replaces=('koffice-l10n-ru')
  cd "${srcdir}"/build/ru
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-sk() {
  pkgdesc=('Slovak Localization for Calligra')
  replaces=('koffice-l10n-sk')
  cd "${srcdir}"/build/sk
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-sl() {
  pkgdesc=('Slovenian Localization for Calligra')
  replaces=('koffice-l10n-sl')
  cd "${srcdir}"/build/sl
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-sv() {
  pkgdesc=('Swedish Localization for Calligra')
  replaces=('koffice-l10n-sv')
  cd "${srcdir}"/build/sv
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-tr() {
  pkgdesc=('Turkish Localization for Calligra')
  replaces=('koffice-l10n-tr')
  cd "${srcdir}"/build/tr
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-uk() {
  pkgdesc=('Ukrainian Localization for Calligra')
  replaces=('koffice-l10n-uk')
  cd "${srcdir}"/build/uk
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-zh_cn() {
  pkgdesc=('Simplified Chinese Localization for Calligra')
  replaces=('koffice-l10n-zh_cn')
  cd "${srcdir}"/build/zh_CN
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-zh_tw() {
  pkgdesc=('Traditional Chinese Localization for Calligra')
  replaces=('koffice-l10n-zh_tw')
  cd "${srcdir}"/build/zh_TW
  make DESTDIR="${pkgdir}" install
}
